//
//  SecondViewController.m
//  UI08_5_协议从前页向后页传值
//
//  Created by Scott on 15/5/16.
//  Copyright (c) 2015年 www.lanou3g.com 蓝欧3G. All rights reserved.
//

#import "SecondViewController.h"
#import "MainViewController.h"

@interface SecondViewController () <MainViewControllerDelegate>

@property (nonatomic, retain) UILabel *label;

@property (nonatomic, retain) NSString *receiveStr;

@end

@implementation SecondViewController

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.label = [[UILabel alloc] init];
    }
    return self;
}


- (void)dealloc
{
    [_label release];
    [super dealloc];
}

- (void)viewDidLoad {
    NSLog(@"%s", __func__);
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.label.Frame = CGRectMake(20, 80, 280, 40);
    self.label.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:self.label];
    [_label release];
    
    
    
}

- (void)viewWillAppear:(BOOL)animated
{
    NSLog(@"%s", __FUNCTION__);
    
}

- (void)viewDidAppear:(BOOL)animated
{
    NSLog(@"%s", __FUNCTION__);
}


- (void)passValue:(NSString *)string
{
    NSLog(@"%s", __FUNCTION__);
    self.label.text = string;

}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
